<!DOCTYPE html>
<html lang="zh-CN">

<head>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="UTF-8">
	<title>网页键盘</title>
</head>

<body>
<center>
<div id="demo">
<h1>以下按钮可控制ESP8266</h1>
<div>
    当前字母 : <span id="NowStr">NA</span><br>
</div>
 <br>
  <button type="button" onclick="sendData(11)">JUMP</button>
  <button type="button" onclick="sendData(12)">STOP</button>
  <button type="button" onclick="sendData(13)">RESTART</button>
 <br>
</div>
<br><br>
<p>此页面用于演示如何通过网页输入以及将输入实时显示于网页中。</p>
<p>本页面由YUE于2021.11.10日编辑</p>

<script>
function sendData(Mystr) {
  var xhttp = new XMLHttpRequest();
  xhttp.onreadystatechange = function() {
    if (this.readyState == 4 && this.status == 200) {
      document.getElementById("NowStr").innerHTML =
      this.responseText;
    }
  };
  xhttp.open("GET", "getStr?Send_Str="+Mystr, true);
  xhttp.send();
}
</script>
</center>
</body>
</html>